package com.changgou.goods.dao;

import com.changgou.pojo.Sku;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;

import javax.naming.Name;
import java.util.Map;

public interface SkuMapper extends Mapper<Sku> {
    @Update("update tb_sku set num = num - #{num} , sale_num = sale_num + #{num} where id = #{skuId} ")
    /*"update tb_sku set num = num-#{num},sale_num = sale_num+#{num} where id = #{skuId} "*/
    void decrNum(@Param("skuId") String skuId,@Param("num") Integer num);
}
